package service

import (
	"com.cracker/src/com.cracker/app/model"
	"flag"
)

type FlagService struct {
}

func (FlagService *FlagService) Parse() *model.FlagModel {
	flagModel := &model.FlagModel{}
	flag.StringVar(&flagModel.Password, "password", "", "锁屏密码")
	flag.StringVar(&flagModel.Address, "address", "127.0.0.1", "服务ip")
	flag.IntVar(&flagModel.Heartbeat, "heartbeat", 5, "心跳时间间隔(单位:秒)")
	flag.IntVar(&flagModel.Port, "port", 8085, "服务端口")
	flag.IntVar(&flagModel.HttpPort, "httpPort", 8086, "http端口")
	flag.StringVar(&flagModel.Token, "token", "Q6aHwiLh8dN4AypkNmUW3mn0E1Pa6lGZ", "校验token")
	flag.StringVar(&flagModel.Uid, "uid", "1", "账号id")
	flag.Parse()
	return flagModel
}
